package com.lf.jwt;

import io.jsonwebtoken.Claims;

import java.io.Serializable;

/** 
* @ClassName: TokenEntity
* @Description:  
* @Author: bite 
* @Date: 2019/3/11 
*/ 
public class TokenEntity implements Serializable {
    private Integer userId;
    private String kyAccount;
    private long expiration;
    private String account;

    private String token;

    public TokenEntity(String token, Claims claims) {
        this.token = token;

        this.account = claims.getAudience();
        this.userId = Integer.valueOf(claims.getId());
        this.kyAccount = claims.getAudience();
        this.expiration = claims.getExpiration().getTime();
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }


    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getKyAccount() {
        return kyAccount;
    }

    public void setKyAccount(String kyAccount) {
        this.kyAccount = kyAccount;
    }

    public long getExpiration() {
        return expiration;
    }

    public void setExpiration(long expiration) {
        this.expiration = expiration;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }


}
